#ifndef HANDSHAKECMD_H
#define HANDSHAKECMD_H

#include "Command/BaseCmd.h"
#include "Protocol/CloudProtocol.h"

class HandshakeCmd : public BaseCmd
{
    Q_OBJECT

public:

    enum{FunctionCode = CloudProtocol::Handshake};

    Q_INVOKABLE explicit HandshakeCmd(QObject *parent = 0);

    Package toPackage();
    void unPackage(Package package);

    QByteArray clientRandom() const;
    void setClientRandom(const QByteArray &clientRandom);

    QByteArray ivecRandom() const;
    void setIvecRandom(const QByteArray &ivecRandom);

    QString appVersion() const;
    void setAppVersion(const QString &appVersion);

    QString systemVersion() const;
    void setSystemVersion(const QString &systemVersion);

    QString systemName() const;
    void setSystemName(const QString &systemName);

    quint8 clientType() const;
    void setClientType(const quint8 &clientType);

private:
    QByteArray m_clientRandom;
    QByteArray m_ivecRandom;
    QString m_appVersion;
    QString m_systemVersion;
    QString m_systemName;
    quint8  m_clientType;

};

#endif // HANDSHAKECMD_H
